edb7746b046967acd71085e4357295a3e131976b,src/main/java/org/literacyapp/web/content/multimedia/audio/AudioEditController.java,AudioEditController,handleSubmit,#HttpSession#Audio#MultipartFile#BindingResult#Model#,73

Before Change


            model.addAttribute("contentLicenses", ContentLicense.values());
            model.addAttribute("literacySkills", LiteracySkill.values());
            model.addAttribute("numeracySkills", NumeracySkill.values());
            model.addAttribute("contentCreationEvents", contentCreationEventDao.readAll(audio));
            return "content/multimedia/audio/edit";
        } else {
            audio.setTranscription(audio.getTranscription().toLowerCase());
            audio.setTimeLastUpdate(Calendar.getInstance());
            audio.setRevisionNumber(Integer.MIN_VALUE);
            audioDao.update(audio);
            
            Contributor contributor = (Contributor) session.getAttribute("contributor");
            
            ContentCreationEvent contentCreationEvent = new ContentCreationEvent();
            contentCreationEvent.setContributor(contributor);
            contentCreationEvent.setContent(audio);
            contentCreationEvent.setCalendar(Calendar.getInstance());
            contentCreationEventDao.update(contentCreationEvent);
            
            if (EnvironmentContextLoaderListener.env == Environment.PROD) {
                String text = URLEncoder.encode(
                        contributor.getFirstName() + " just edited an Audio:\n" + 
                        "• Language: " + audio.getLocale().getLanguage() + "\n" + 
                        "• Transcription: \"" + audio.getTranscription() + "\"\n" + 
                        "• Audio format: " + audio.getAudioFormat() + "\n" + 
                        "See ") + "http://literacyapp.org/content/multimedia/audio/list";
                String iconUrl = contributor.getImageUrl();
                SlackApiHelper.postMessage(Team.CONTENT_CREATION, text, iconUrl, "http://literacyapp.org/audio/" + audio.getId() + "." + audio.getAudioFormat().toString().toLowerCase());
            }
            
            return "redirect:/content/multimedia/audio/list";

After Change


            return "content/multimedia/audio/edit";
        } else {
            audio.setTranscription(audio.getTranscription().toLowerCase());
            audio.setTimeLastUpdate(Calendar.getInstance());
            audio.setRevisionNumber(Integer.MIN_VALUE);
            audioDao.update(audio);
            
            return "redirect:/content/multimedia/audio/list";
        }